]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
[runDialog] Add 'debugexit' command
authorColin Walters <walters@verbum.org>
Tue, 15 Sep 2009 21:40:26 +0000 (17:40 -0400)
committerColin Walters <walters@verbum.org>
Tue, 15 Sep 2009 21:47:57 +0000 (17:47 -0400)
There are few uses for being able to exit the shell directly; my
current one is that the gtype debug infrastructure is implemented
as an atexit() handler.

js/ui/runDialog.js

index 0f97cb250c0bc52fbe57e08a714f525c127aec58..53315b45d4c219b2fc70db964d0b015ab59881e5 100644 (file)
@@ -5,6 +5,7 @@ const Clutter = imports.gi.Clutter;
 const GLib = imports.gi.GLib;
 const Lang = imports.lang;
 const Mainloop = imports.mainloop;
+const Meta = imports.gi.Meta;
 const Shell = imports.gi.Shell;
 const Signals = imports.signals;
 const Gettext = imports.gettext.domain('gnome-shell');
@@ -53,6 +54,10 @@ RunDialog.prototype = {
                                    // Developer brain backwards compatibility
                                    'restart': Lang.bind(this, function() {
                                        global.reexec_self();
+                                   }),
+
+                                   'debugexit': Lang.bind(this, function() {
+                                       Meta.exit(Meta.ExitCode.ERROR);
                                    })
                                  };